package com.fansz.FanszAPI.domain;

import com.fansz.FanszAPI.utils.StringUtils;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.io.Serializable;

@Document(collection="user")
public class User implements Serializable{

    /**
     *
     */
    private static final long serialVersionUID = -2702663652288470000L;

    @Id
    @Field
    private String id;
    @Field
    private String password;

    @Field
    private String mobile;

    @Field
    private String mail;

    @Field
    private String nickName;

    @Field
    private String portrait;

    @Field
    private String level;

    @Field
    private String group;

    @Field
    private String createTime;

    @Field
    private String updateTime;

    public String getSessionId() {
        return sessionId;
    }

    public void setSessionId(String sessionId) {
        this.sessionId = sessionId;
    }

    @Field
    private String sessionId;

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getMail() {
        return mail;
    }

    public void setMail(String mail) {
        this.mail = mail;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getPortrait() {
        return portrait;
    }

    public void setPortrait(String portrait) {
        this.portrait = portrait;
    }

    public String getLevel() {
        return level;
    }

    public void setLevel(String level) {
        this.level = level;
    }

    public String getGroup() {
        return group;
    }

    public void setGroup(String group) {
        this.group = group;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    public String getId() {

        return id;
    }
    public void setId(String id) {
        this.id = id;
    }

    public String getPassword() {
        return password;
    }
    public void setPassword(String password) {
        this.password = password;
    }

    @Override
    public String toString() {
        return "{id:" + this.id + ",password:" + this.password + ",mobile:" + this.mobile + ",mail:" + this.mail +
                ",nickName:" + this.nickName + ",portrait:" + this.portrait + ",level:" + this.level + ",group:" + this.group + ",createTime:" + this.createTime + ",updateTime:" + this.updateTime + "}";
    }
}
